package kr.hkit.powerjava.chapter22.submit3;

//티쳐 example
import java.util.HashMap;
import java.util.Map;

public class Example {
	public static void main(String[] args) {
		
		Map<Integer, Integer> m = new HashMap<>();
		int[] jumsu = {99,98,80,76,50,81,65,55,79,92};
		
		for (int a: jumsu) { //구간분류해서 카운트
			Integer r = m.get(a/10);
			m.put(a/10, ( r == null )? 1 : r+1);
		}
		
		for (Map.Entry<Integer, Integer> m1 : m.entrySet()) {
			int key = m1.getKey();
			int value = m1.getValue();
			System.out.println(key*10+"점 대 : " +value + "명");
		}
	}
}
